package com.xnx3.wangmarket.plugin.innerAccount.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 开通的用户账号所对应的部门
 * @author 管雷鸣
 */
@Entity
@Table(name = "plugin_inneraccount_department_user")
public class DepartmentUser implements java.io.Serializable {

	private Integer id;		//自动编号
	private Integer userid;	//用户id，对应user.id
	private Integer departmentId;	//部门id，当前用户所属哪个部门
	

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false )
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	
	@Column(name = "userid", columnDefinition="int(11) comment '用户id，对应user.id'")
	public Integer getUserid() {
		return userid;
	}

	public void setUserid(Integer userid) {
		this.userid = userid;
	}
	
	@Column(name = "department_id", columnDefinition="int(11) comment '部门id，当前用户所属哪个部门'")
	public Integer getDepartmentId() {
		return departmentId;
	}

	public void setDepartmentId(Integer departmentId) {
		this.departmentId = departmentId;
	}

	@Override
	public String toString() {
		return "DepartmentUser [id=" + id + ", userid=" + userid + ", departmentId=" + departmentId + "]";
	}
	
	
}